home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
tex
/
nobit71.zip
/
NOBIT7.DOC
< prev
next >
Wrap
Text File
|
1988-10-19
|
5KB
|
123 lines
No Bit 7 - Version 1.00
Copyright 1988, Ray Johns
=============================
Purpose : To remove control characters from WordStar files.
NOBIT7.COM is a small program I wrote up for my personal
use. All it does is open the specified file and remove bit 7
from all the characters and writes them back to the original
file. For along time I had a little program in BASIC that I
wrote up many years ago to do the same thing. It got the job
done fine, but took forever and a day just to do a relatively
small file. You may wonder of what use removing bit seven is
from text files. There may be other uses for NOBIT7.COM, but
it's intended use it to "clean" text or source code files
generated by WordStar. In the document mode, WordStar adds
"control characters" to some letters. This can also happen in
the non-document mode in some cases to a lesser degree. The
problem comes in when you try to use a file with these control
codes in a situation where they are not allowed, say for example,
in a source code being compiled by A86 or MASM (my main use for
NOBIT7.COM). To fix the problem you must remove these control
characters (which are really YOUR characters + bit 7 or
chr$(128)), that's what NOBIT7.COM does.
As I said, I had a BASIC program to do this, but is was
very, very slow... we're talking 2 or 3 minutes to do 70K source
code. After I got up to speed in .ASM on the 8088 CPU, I wrote
up NOBIT7.COM to test out some of the file I/O stuff in DOS, it
turned out MUCH faster than the BASIC version (I knew there was a
reason why I learn assembly language!) Infact, after a little
buffer tweaking, NOBIT7.COM would typically clean a 100K file in
just a few seconds.
I never intended to send this little utility out the door, I
only wrote it as a test and used it in place of my BASIC program,
but the other day I looked on my favorite BBS and saw this little
program to "clean WordStar files." I thought to myself, oooh
neat, I'll see it does anything different than my version. To my
surprise the .COM file was over 13K !!! To make matters worse,
the program took almost FIVE times as long to run and didn't have
any features beyond my version! Geeze, bigger and slower, what
more could you ask for in a utility (grin). So in an effort to
put off work that really needed to be done, I threw together this
the command line or via an input line and uploaded it to a few
BBS'es. It's shareware, but I don't want any money, if you
really want to send me a buck or something, I won't say no.
There's no help or anything because the program is pretty
straight forward. You can use path names and filenames, no
wildcards, just non-ambiguous filename. You can either say
NOBIT7 filename.ext and it will use that filename, or you can
just type NOBIT7 and it will ask you for an input file. Be
1
careful not to run this on .COM or non-text files, it will remove
bit 7 from any file you specify. I give this program to you in
an "as is" condition and you use it at your own risk. Also
beware, that if you have graphic line drawing in your file or
your source code, this will reset the graphic bit (ie bit 7) and
make it text. The program has error checking and all, but try to
use your head when you use it. I use it on all my source codes
and have never had a problem, but keep in mind that it does read
and write to the same file, if you are dealing with a life and
death term paper make a .TMP file just incase a TSR or something
attacks while NOBIT7 is running.
Oh, one last thing, I don't check free memory, the program
is under 1K long so I just use the other 63K in the current
program segment for a 50K read/write buffer, don't run this if
you have only 3K of memory free, I have no idea what will happen,
and I don't want to know (hahah, grin). The little dots that
show up after the "Working" message equal blocks of data up to
50K long. So for a 155K file you should see four dots,
50K+50K+50K and one for the last 5K. It's very fast, even on my
XT, so don't blink when you run it on 50K or smaller files, they
only take a split second. If you want to get a fresh copy, or
look at some of my bigger utility programs you are welcome to
call me at the SURF or CRICKET BBS. The numbers follow, along
with the names of my two latest shareware programs. If you don't
have them on your favorite BBS call and grab a copy for your part
of the country.
Other programs to look for from me :
DMD200.ARC - Disk meter, keep track of you disk space.
ZDIR100.ARC - Nice little DIR type program, check it out.
BBS numbers for above and for NOBIT7.COM or just to chat.
The Cricket BBS - 12/2400, 24 hours. (408) 373-3773
The SURF BBS - 3/12, 24 hours. (408) 649-6148
I'm logged on both as "RAY JOHNS" and I'm the remote sysop
of the second one, drop in anytime and say hello, love to hear
your comments on my programs or a program that you would like to
see. Bye, hope you find NOBIT7.COM useful, if nothing else it
will be handy for improving those upload/download ratios!
Ray Johns
Box 1440
Pebble Beach, CA. 93953
2